<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="../jsjar/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
$(function(){
	$(".delete").click(function(){
		var id=$(this).attr("myid");
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cddelete?id="+id);
	});
	$(".update").click(function(){
		var id=$(this).attr("myid");
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdjumpupdate?id="+id);
	});
	$("#insert").click(function(){
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdjumpinsert");
	}); 
	$("#down").click(function(){
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdselectall?id=${ts+1}");
	}); 
	$("#up").click(function(){
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdselectall?id=${ts-1}");
	}); 
	$("#uup").click(function(){
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdselectall?id=1");
	}); 
	$("#downn").click(function(){
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdselectall?id=${count}");
	}); 
	$("#go").click(function(){
		var id=$("#id").val();
		$("#myaaa").load("${pageContext.request.contextPath}/fuser/cdselectall?id="+id);
	}); 
});
</script>
<style type="text/css">
table{border:0.5px solid #4e6ef2;text-align:center;width:100%;}
table tr td{border:0.5px solid #4e6ef2;height:35px;}
#bottom{width:100%;height:100px;}
#ul2{list-style:none;width:400px;height:60px;}
#ul2 li{float:left;margin-left: 5px;}
#id{width:80px;height:25px;margin-left:30px;border-top-left-radius: 5px;border-bottom-left-radius: 5px;}
#go{width:50px;height:25px;border:1.5px solid #4e6ef2;background-color:#4e6ef2;color:white;border-top-right-radius: 4px;border-bottom-right-radius: 4px;}
</style>
<body>
<div id="myaaa">
	<table align="center" >
		<tr>
			<td><a id="insert" href="#">添加</a></td>
			<td>ID</td>
			<td>姓名</td>
			<td>年龄</td>
			<td>性别</td>
			<td>身份证</td>
			<td>权限</td>
			<td>账号</td>
			<td>密码</td>
			<td></td>
		</tr>	
		<c:forEach var="fuser" items="${fuser }">
		<tr>
			<td><a class="update" myid="${fuser.fid }" href="#">修改</a></td>
			<td>${fuser.fid }</td>
			<td>${fuser.fname }</td>
			<td>${fuser.fage }</td>
			<td>${fuser.fsex }</td>
			<td>${fuser.fidcard }</td>
			<td>${fuser.power }</td>
			<td>${fuser.fusername }</td>
			<td>${fuser.fpassword }</td>
			<td><a class="delete" myid="${fuser.fid }" href="#">删除</a></td>
		</tr>
		</c:forEach>
	</table>
	<div id="bottom">
		<ul id="ul2">
		<li><a href="#" id="uup">首页</a></li>
		<li><a href="#" id="downn">末页</a></li>
		<li><a href="#" id="up">上一页</a></li>
		<li>${ts}/${count }</li>
		<li><a href="#" id="down">下一页</a></li>
		<li><input type="text" name="id" id="id"><a href="#" id="go">去这里</a></li>
		</ul>
	</div>
</div>
</body>
</html>